/* 表单组件样式 */
.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 1rem;
}

.label-icon {
  margin-right: 8px;
  font-size: 1.1rem;
}

.contact-dropdown,
.note-input {
  width: 100%;
  padding: 15px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
}

.contact-dropdown:focus,
.note-input:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  transform: translateY(-2px);
}

.note-input {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.note-tip {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #7f8c8d;
  font-style: italic;
}

.selected-contact-info {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid #3498db;
}

.contact-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.contact-avatar.small {
  width: 35px;
  height: 35px;
  font-size: 1rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
}

.contact-details strong {
  color: #2c3e50;
}

.contact-details span {
  color: #7f8c8d;
  font-size: 0.9rem;
}

/* 报警按钮样式 */
.button-container {
  text-align: center;
  margin-top: 40px;
}

.button-background {
  position: relative;
  display: inline-block;
}

.emergency-button {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  border-radius: 60px;
  padding: 25px 70px;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 15px 35px rgba(231, 76, 60, 0.4);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 2;
}

.emergency-button:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 20px 45px rgba(231, 76, 60, 0.6);
}

.emergency-button:active {
  transform: translateY(2px) scale(0.98);
}

.emergency-button.loading {
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
  cursor: not-allowed;
  transform: none;
}

.emergency-button.loading:after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: loading 1.5s infinite;
}

.button-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border-radius: 60px;
  filter: blur(20px);
  opacity: 0.6;
  z-index: 1;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.button-text {
  position: relative;
  z-index: 3;
}

.button-icon {
  font-size: 2rem;
  z-index: 3;
}

.emergency-tip {
  margin-top: 20px;
  color: #7f8c8d;
  font-size: 0.95rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* 弹窗样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: white;
  border-radius: 15px;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal.success {
  border-top: 5px solid #27ae60;
}

.modal.error {
  border-top: 5px solid #e74c3c;
}

.modal-content {
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}

.modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
}

.modal.success .modal-icon {
  background: #d5f4e6;
  color: #27ae60;
}

.modal.error .modal-icon {
  background: #fdeaea;
  color: #e74c3c;
}

.modal-text {
  flex: 1;
}

.modal-text h3 {
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.modal-text p {
  color: #7f8c8d;
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #bdc3c7;
  transition: color 0.3s;
}

.modal-close:hover {
  color: #e74c3c;
}

.modal-progress {
  height: 4px;
  background: #ecf0f1;
}

.progress-bar {
  height: 100%;
  background: #3498db;
  width: 100%;
  animation: progressShrink 5s linear;
}

@keyframes progressShrink {
  from { width: 100%; }
  to { width: 0%; }
}

/* 报警记录样式 */
.history-container {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f8f9fa;
}

.history-header h2 {
  color: #2c3e50;
  font-size: 1.8rem;
}

.back-button {
  background: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: #2980b9;
  transform: translateX(-3px);
}

.history-count {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.empty-history {
  text-align: center;
  padding: 60px 20px;
  color: #bdc3c7;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-history h3 {
  margin-bottom: 10px;
  color: #95a5a6;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.history-item {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid #3498db;
  transition: all 0.3s ease;
}

.history-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.alert-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.alert-contact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-info strong {
  color: #2c3e50;
  font-size: 1.1rem;
}

.contact-info span {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.alert-status {
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.alert-status.success {
  background: #d5f4e6;
  color: #27ae60;
}

.alert-status.failed {
  background: #fdeaea;
  color: #e74c3c;
}

.alert-note {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 3px solid #ffeaa7;
  font-style: italic;
  color: #2d3436;
}

.alert-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #95a5a6;
}